package com.aat.dxfy.thread.demo02;

public class SynchronizedIdGenerator {
	private int value = 0;

	public synchronized int getNext() {
		return value++;
	}

	public int getNextV2() {
		synchronized (this) {
			return value++;
		}
	}
}